Initializes a new instance of the
ConcurrentDictionary<(Of <(TKey, TValue>)>)
class that contains elements copied from the specified
IEnumerable<(Of <(KeyValuePair<(Of <(TKey, TValue>)>)>)>), has the default concurrency
level, has the default initial capacity, and uses the default comparer for the key type.
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Sub New ( _
collection As IEnumerable(Of KeyValuePair(Of TKey, TValue)) _
) |
| C# |
|---|
public ConcurrentDictionary(
IEnumerable<KeyValuePair<TKey, TValue>> collection
) |
Exceptions
| Exception | Condition |
|---|
| System..::.ArgumentNullException | collection is a null reference
(Nothing in Visual Basic). |
| System..::.ArgumentException | collection contains one or more
duplicate keys. |
See Also